﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace Obra.Test.SmugMug
{
    [TestFixture]
    public class SmugMugDateTimeTester
    {
        [Test]
        public void Parse()
        {
            DateTime dateTime = Obra.SmugMug.Api.SmugMugDateTime.Parse(
                "2000-01-31 08:30:45");

            Assert.AreEqual(2000, dateTime.ToUniversalTime().Year);
            Assert.AreEqual(1, dateTime.ToUniversalTime().Month);
            Assert.AreEqual(31, dateTime.ToUniversalTime().Day);
            Assert.AreEqual(16, dateTime.ToUniversalTime().Hour);
            Assert.AreEqual(30, dateTime.ToUniversalTime().Minute);
            Assert.AreEqual(45, dateTime.ToUniversalTime().Second);
        }
    }
}
